package com.westos.todo.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.test.context.ContextConfiguration;

@ContextConfiguration(locations = {"classpath:springmvc.xml"})
public abstract class AbstractUser {
	
	@Autowired
	protected JdbcTemplate jdbcTemplate;
	
	protected void initdb(){
		String sql="";
		sql="delete from user";
		jdbcTemplate.update(sql);
		sql="insert into user(id,username,password) values(1,'admin','123456')";
		jdbcTemplate.update(sql);
	}
}
